import request from '../utils/request'

export const fetchmessage = query => {
  return request({
    url: '/salary/apis/employess',
    method: 'get',
    params: query
  })
}

export const postmessage = query => {
  return request({
    url: '/salary/apis/employess',
    method: 'post',
    data: query
  })
}

export const putmessage = query => {
  console.log(query)
  return request({
    url: '/salary/apis/employess',
    method: 'put',
    data: query
  })
}
export const deletemessage = query => {
  console.log(query)
  return request({
    url: '/salary/apis/employess',
    method: 'delete',
    params: query
  })
}
// -------------------------------------------------------------department
export const fetchdepartment = query => {
  return request({
    url: '/salary/apis/department',
    method: 'get',
    params: query
  })
}

export const postdepartment = query => {
  return request({
    url: '/salary/apis/department',
    method: 'post',
    data: query
  })
}

export const putdepartment = query => {
  console.log(query)
  return request({
    url: '/salary/apis/department',
    method: 'put',
    data: query
  })
}
export const deletedepartment = query => {
  console.log(query)
  return request({
    url: '/salary/apis/department',
    method: 'delete',
    params: query
  })
}

export const fetchmoney = query => {
  return request({
    url: '/salary/apis/wdata',
    method: 'get',
    params: query
  })
}

export const postmoney = query => {
  return request({
    url: '/salary/apis/wdata',
    method: 'post',
    data: query
  })
}

export const putmoney = query => {
  console.log(query)
  return request({
    url: '/salary/apis/wdata',
    method: 'put',
    data: query
  })
}
export const deletemoney = query => {
  console.log(query)
  return request({
    url: '/salary/apis/wdata',
    method: 'delete',
    params: query
  })
}

export const fetchemployesswage = query => {
  return request({
    url: '/salary/apis/employesswage',
    method: 'get',
    params: query
  })
}

export const fetchdepartmentwage = query => {
  return request({
    url: '/salary/apis/departmentwage',
    method: 'get',
    params: query
  })
}

export const fetchallwage = query => {
  return request({
    url: '/salary/apis/allwage',
    method: 'get',
    params: query
  })
}

export const fetchattendance = query => {
  return request({
    url: '/salary/apis/attendance',
    method: 'get',
    params: query
  })
}

export const postattendance = query => {
  return request({
    url: '/salary/apis/attendance',
    method: 'post',
    data: query
  })
}

export const putattendance = query => {
  console.log(query)
  return request({
    url: '/salary/apis/attendance',
    method: 'put',
    data: query
  })
}
export const deleteattendance = query => {
  console.log(query)
  return request({
    url: '/salary/apis/attendance',
    method: 'delete',
    params: query
  })
}

export const fetchovertime = query => {
  return request({
    url: '/salary/apis/overtime',
    method: 'get',
    params: query
  })
}

export const postovertime = query => {
  return request({
    url: '/salary/apis/overtime',
    method: 'post',
    data: query
  })
}

export const putovertime = query => {
  console.log(query)
  return request({
    url: '/salary/apis/overtime',
    method: 'put',
    data: query
  })
}
export const deleteovertime = query => {
  console.log(query)
  return request({
    url: '/salary/apis/overtime',
    method: 'delete',
    params: query
  })
}
